using CPService.Models;

namespace CPService.Migrations
{
    using System;
    using System.Data.Entity;
    using System.Data.Entity.Migrations;
    using System.Linq;

    internal sealed class Configuration : DbMigrationsConfiguration<CPService.Models.CPServiceContext>
    {
        public Configuration()
        {
            AutomaticMigrationsEnabled = false;
        }

        protected override void Seed(CPService.Models.CPServiceContext context)
        {
            context.Parliamentarians.AddOrUpdate(p => p.ParliamentarianId,
                new Parliamentarian
                {
                    NegativeOpinions = 8,
                    PositiveOpinions = 6
                },
                new Parliamentarian
                {
                    NegativeOpinions = 2,
                    PositiveOpinions = 9
                });
        }
    }
}
